﻿<UserControl x:Class="SL4_MVVM_MEF.MEFModule.Views.SampleView"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:controlsToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit" 
	mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="400" 
	d:DataContext="{d:DesignData /SampleData/SampleView.xaml}" 
	>
				
	<StackPanel>
		<StackPanel Orientation="Horizontal">
			<TextBox Text="A ViewModel property MEF imported:" FontWeight="Bold"/>
			<TextBox Text="{Binding aViewModelProperty}" Margin="10,0,0,0"/>
		</StackPanel>
		<Button x:Name="CommandButton" Command="{Binding addDataItemCommand}" CommandParameter="{Binding dataItems}"
				Content="Click me to Add a new Item!" Margin="0,10" Width="200"/>
		<ListBox ItemsSource="{Binding dataItems}">
			<ListBox.ItemTemplate>
				<DataTemplate>
					<StackPanel Orientation="Horizontal">
						<TextBlock Text="{Binding Description}"/>
					</StackPanel>
				</DataTemplate>
			</ListBox.ItemTemplate>
		</ListBox>
		<controlsToolkit:BusyIndicator IsBusy="{Binding IsLoading, Mode=TwoWay}" />
	</StackPanel>
</UserControl>
